package com.ocm.core.service;

import java.util.List;
import java.util.Map;

import com.ocm.core.dto.GroupDto;
import com.ocm.core.dto.SecurityDto;
import com.ocm.core.dto.StorageDto;
import com.ocm.core.dto.UserInfoDto;
import com.ocm.core.model.Files;
import com.opm.security.core.model.ExternalUserDetails;

public interface ContentEngineService {

   StorageDto getStorage(String storageName);

   String createInstance(String className, Map<String, Object> properties, StorageDto storage, List<SecurityDto> securityDtos) throws Exception;

   Files download(String fileGUID, String storageName, String[] properties);

   Object fetchReferenceValues(String objectGUID, String propertyName, String[] propertyNames, int maxItems, StorageDto storage);

   Object downloadFromReferenceValues(String objectGUID, String propertyName, String[] properties, int maxItems, StorageDto storage);

   void updateInstance(String objectGUID, Map<String, Object> properties, StorageDto storage);

   void checkOut(String objectGUID, StorageDto storage);

   void checkin(String objectGUID, Map<String, Object> properties, StorageDto storage);

   void delete(StorageDto storage, String guid);

   boolean hasExist(String objectGUID, StorageDto storage);

   Long addNewUser(String username, String password, String[] defaultGroups);

   ExternalUserDetails loadByUsername(String username);

   GroupDto loadByGroupname(String groupname);

   UserInfoDto getContentCreator(StorageDto storage, String objectGUID);
}
